package com.synjones.pay.model.context;

import java.util.Map;

/**
 * context interface
 * @author zhzy
 */
public interface IContext {
    
    /**
     * add new data item
     * @param key
     * @param value 
     */
    void add(String key, Object value);
    
    /**
     * add map data
     * @param map 
     */
    void addAll(Map<String, Object> map);
    
    /**
     * get data item by key
     * @param <T>
     * @param key
     * @return 
     */
    <T extends Object> T get(String key);
    
    /**
     * transfer data to query String,and exclude particular key
     * @param exclude
     * @return
     */
    String toQueryString(String[] exclude);
    
}
